@echo off
chcp 65001 >nul
set "SCRIPT_DIR=%~dp0"
set "PYTHON_EXE=%SCRIPT_DIR%..\python\python.exe"
if not exist "%PYTHON_EXE%" (
    echo [错误] 未检测到 %PYTHON_EXE% ，请确认 python 已放在当前目录的 python 文件夹下
    pause
    exit /b
)
openfiles >nul 2>&1
if %errorlevel%==0 goto :run
powershell -Command "Start-Process cmd -ArgumentList '/c cd /d "%SCRIPT_DIR%" && "%PYTHON_EXE%" py_scripts\tools\installVS_build.py' -Verb RunAs"
exit /b
:run
cd /d "%SCRIPT_DIR%"
"%PYTHON_EXE%" py_scripts\tools\installVS_build.py
pause